![]() |
ControlUserPaneActivateProcPtr |
||||
Header: | ControlDefinitions.h | Carbon status: | Supported | |
Handles activate and deactivate event processing.
typedef void(* ControlUserPaneActivateProcPtr) ( ControlRef control, Boolean activating );
You would declare your function like this if you were to name it MyControlUserPaneActivateCallback:
void MyControlUserPaneActivateCallback ( ControlRef control, Boolean activating );
A handle to the control in which the activate event occurred.
If true, the control is being activated. If false, the control is being deactivated.
The Control Manager defines the data type UserPaneActivateUPP to identify the universal procedure pointer for this application-defined function:
typedef UniversalProcPtr ControlUserPaneActivateUPP;
You typically use the NewControlUserPaneActivateProc macro like this:
ControlUserPaneActivateUPP myControlUserPaneActivateUPP;
myControlUserPaneActivateUPP = NewControlUserPaneActivateProc (MyControlUserPaneActivateCallback);
You typically use the CallControlUserPaneActivateProc macro like this:
CallControlUserPaneActivateProc(myControlUserPaneActivateUPP, control, activating);
Your MyControlUserPaneActivateCallback function should perform any special processing before the user pane becomes activated or deactivated. For example, it should deactivate its TEHandle or ListHandle if the user pane is about to be deactivated.
This function is called only if you’ve set the kControlWantsActivate feature bit on creation of the user pane control.
Once you have provided a user pane application-defined function, you can call the function SetControlData in order to associate your function with a control. User pane application-defined functions are identified to SetControlData by tag constants; for a description of the tag constants, see the “Control Manager Constants” section. For example, once you have created the function MyControlUserPaneActivateCallback, pass kControlUserPaneActivateProcTag in the tagName parameter of SetControlData.
This function is available with Appearance Manager 1.0 and later.
Supported in Carbon.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)